Parameters

The Report Viewer for Java provides the following parameters:

CanDrillDown

Indicates whether or not the user can drill-down on summary data, graphs, or charts in the report.

HasExportButton

Indicates whether or not an Export button appears on the Report Viewer. The export button allows users to export reports displayed in the Report Viewer to Microsoft Word, Microsoft Excel, HTML 3.2, or Seagate Crystal Reports format.

To override this setting use the Crystal Report Web Components Manager application. For more information, refer to the Report Viewing tab.

HasGroupTree

Indicates whether or not the viewer generates a Group Tree for the report. Does not indicate whether or not the Group Tree is displayed.

HasPrintButton

Indicates whether or not the viewer includes a print button allowing the viewed report to be printed.

Printing from the Report Viewer for Java requires a web browser or Java Virtual Machine that supports version 1.1 or later of the Java Developer's Kit (JDK).

HasRefreshButton

Indicates whether or not a Refresh button is available in the viewer to allow the user to refresh report data.

HasTextSearchControls

Indicates that the viewer includes controls to allow searching for specific values in the report.

ReportName

Specifies the report to be displayed inside the viewer. The path must be a URL on the same server as the HTML document and must be placed inside quotation marks.

ShowGroupTree

Indicates whether or not the Group Tree is displayed when the viewer first appears. If the HasGroupTree parameter is set to False, this parameter is ignored. If the Group Tree is hidden, the user can display it by clicking the Toggle Group Tree button in the viewer.

Example

The following code demonstrates one means of embedding the Report Viewer for Java in a web page. This JavaScript code determines browser version and then installs the appropriate version of the Report Viewer for Java.

<SCRIPT LANGUAGE="JavaScript"><!--
     var _ns3 = false;
     var _ns4 = false;
     //--></SCRIPT>
     <COMMENT><SCRIPT LANGUAGE="JavaScript1.1"><!--
     var _info = navigator.userAgent;
     var _ns3 = (navigator.appName.indexOf("Netscape") >= 0 && _info.indexOf("Mozilla/3") >= 0);
     var _ns4 = (navigator.appName.indexOf("Netscape") >= 0 && _info.indexOf("Mozilla/4") >= 0 );
     //--></SCRIPT></COMMENT>
    <SCRIPT LANGUAGE="JavaScript"><!--
     if(_ns3==true)
     document.writeln( '<applet code=com.seagatesoftware.img.ReportViewer.ReportViewer
    codebase="/viewer/JavaViewer" id=ReportViewer width=100% height=95%
    archive="/viewer/JavaViewer/ReportViewer.zip">' );
     else if (_ns4 == true)
     document.writeln( '<applet code=com.seagatesoftware.img.ReportViewer.ReportViewer
    codebase="/viewer/JavaViewer" id=ReportViewer width=100% height=95%
    archive="/viewer/JavaViewer/ReportViewer.jar">' );
     else
     document.writeln( '<applet code=com.seagatesoftware.img.ReportViewer.ReportViewer
    codebase="/viewer/JavaViewer" id=ReportViewer width=100% height=95%>' );
    //--></SCRIPT>
    <param name=Language value="en">
    <param name=ReportName value="empprof.rpt">
    <param name=ReportParameter value="">
    <param name=HasGroupTree value="true">
    <param name=ShowGroupTree value="true">
    <param name=HasRefreshButton value="true">
    <param name=HasPrintButton value="true">
    <param name=HasExportButton value="true">
    <param name=HasTextSearchControls value="true">
    <param name=CanDrillDown value="true">
    <param name=PromptOnRefresh value="true">
    <param name=cabbase value="/viewer/JavaViewer/ReportViewer.cab">
    </applet>

This example displays the empprof.rpt report in the Report Viewer for Java window. A Group Tree is generated to allow Smart Navigation, but it will be hidden initially. The viewer does not allow a user to refresh the report data.



Seagate Software, Inc.
http://www.seagatesoftware.com
Please send comments to:
techpubs@seagatesoftware.com